# -*- coding: utf-8 -*-
# @Time : 2023/12/19 15:59
# @Author : debbyszhang
# @File : doc.py
# @desc :


import inspect

class MyClass:
    """
    This is the class documentation.
    It can span multiple lines.
    """

    def my_method(self):
        """
        This is the method documentation.
        It can also span multiple lines.
        """
        pass

# Get the class documentation
class_doc = inspect.getdoc(MyClass)
print(class_doc)

# Get the method documentation
method_doc = inspect.getdoc(MyClass.my_method)
print(method_doc)